﻿package baidu.reader.common
{
    import flash.utils.*;

    public class CoreFactory extends Object
    {

        public function CoreFactory()
        {
            return;
        }// end function

        public static function getCore(param1:String) : IReaderCore
        {
            var _loc_2:Class = null;
            switch(param1)
            {
                case CoreTypes.DOC:
                {
                    _loc_2 = getDefinitionByName("baidu.reader.doc.DocReaderCore") as Class;
                    return new _loc_2 as IReaderCore;
                }
                case CoreTypes.TXT:
                {
                    _loc_2 = getDefinitionByName("baidu.reader.txt.TxtReaderCore") as Class;
                    return new _loc_2 as IReaderCore;
                }
                default:
                {
                    return null;
                    break;
                }
            }
        }// end function

    }
}
